function [ g] = First2StepsWithoutStaying( x )
%Functions gives the probabilities where the ship will be after the very
%first two steps, if it can not stand still in the firt move. 
% x contains the probability to move forwards p and to stand still s.
global n;
p=x(1);
s=x(2);

g(1)=p/(n+1); %two away
g(2)=s/(n+1); %one away
g(3)=(1-n*p-s); % at the starting point

end

